home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Bus / T-Z / VCR+(app+src) Folder / Sources / lookup.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-16  |  517 b   |  27 lines  |  [TEXT/KAHL]

  1. #include "VCRplus.h"
  2.  
  3. extern    unsigned long    start[480], leng[480] ;
  4.  
  5. /* the 512-entry tables of starting time and pgm duration */
  6. void    lookup(long i, unsigned long *outtime, unsigned long *outdur)
  7. {
  8.     static    long     initializer = 0;
  9.  
  10.     long     j, s;
  11.  
  12.     if((i >= 480) || (i < 0))
  13.         SetDText(19, "\pIllegal table index!");
  14.     else
  15.     {
  16.         *outtime = (start[i]) ;
  17.         *outdur = (leng[i]) ;
  18.     }
  19.  
  20.     if( (*outtime == INVALID) || (*outdur == INVALID) )
  21.     {
  22.         SetDText(19, "\pOops, I'm missing an entry!");
  23.         *outtime = 0;
  24.         *outdur = 0;
  25.     }
  26. }
  27.